#-*- coding:utf-8 -*-
# import os
# import sys
# from PySide2.QtGui import *
# from PySide2.QtCore import *
# from PySide2.QtWidgets import *
#
#
# class ColorMesh(QDialog):
#
#     def __init__(self):
#         super(ColorMesh, self).__init__()
#         self.
try:
    import maya.cmds as cmds
except Exception as test_ERR:
    print('test')

def _run():
    objs = cmds.ls(sl=True)
    if len(objs) < 1:
        cmds.confirmDialog(title=u'提示', message=u'请至少选择一个物体', button=['Yes'], defaultButton='Yes', dismissString='No')
    else:
        cmds.colorEditor()
        if cmds.colorEditor(query=True, result=True):
            value = cmds.colorEditor(query=True, rgb=True)
            for o in objs:
                cmds.color(o, rgb=value)



def _doc():
    doc = {'name':u'线框颜色','doc':'对选择的物体进行自定义颜色修改'}
    return doc